//
//  QCEmotionModel.swift
//  SwiftDemoWithSina
//
//  Created by qu on 2017/2/11.
//  Copyright © 2017年 Apple. All rights reserved.
//

import UIKit

class QCEmotionModel: NSObject,NSCoding {

    //emoji表情需要
    var code: String?
    //图片描述
    var chs: String?
    //图片名
    var png: String?
    
    //类型(1是emoji表情 0 是图片表情)
    var type: String?{
        didSet{
          isEmoji = (type == "1")
            
        }
        
    }
    
    var isEmoji: Bool = false
    
    var path: String?
    
    override init() {
        super.init()
    }
    
    // 归档
    func encode(with aCoder: NSCoder) {
        self.yy_modelEncode(with: aCoder)
    }
    
    // 解档
    required init?(coder aDecoder: NSCoder) {
        super.init()
        self.yy_modelInit(with: aDecoder)
    }
    
}
